.select_helper_popup {
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 6px !important;
  z-index: 1000 !important;
  &.select_helper_popup_menu {
    width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100vw !important;
  }

  &_content {
    padding: 12px;

    .q-checkbox--dense .q-checkbox__inner {
      width: 15px;
      height: 15px;
      min-width: 15px;
    }

    .select_helper_history {
      display: flex;
      padding-bottom: 16px;
      gap: 6px;
      flex-wrap: wrap;
      .tr-chips-size-small .t-chip .q-chip__content {
        font-size: 14px;
      }
      .q-chip--dense {
        border-radius: 12px;
        margin: 0;
      }
    }
  }
  &.single &_content {
    padding: 0;
  }
  &_table {
    //移除组件内boxshadow
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
  }

  &_foot {
    display: flex;
    justify-content: end;
    padding-top: 8px;

    // padding-bottom: 20px;
    button {
      margin-left: 8px;
    }
  }

  &_footGroup {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    align-items: center;

    &_checkContent {
      display: flex;
      width: 70%;
      align-items: center;
      margin-bottom: 0;
      gap: 12px;
      &_content {
        display: flex;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        direction: rtl;
        align-items: center;
        // margin-right: 10px;
        span {
          display: inline-block;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        button {
          flex: none;
          display: inline-block;
        }
        img {
          width: 20px;
          height: 20px;
          margin-left: 4px;
          border-radius: 4px;
        }
      }
    }
  }

  .q-table--col-auto-width {
    width: 40px;
  }

  &.single .q-table--dense .q-table thead tr,
  &.single .q-table--dense .q-table tbody tr,
  &.single .q-table--dense .q-table tbody td {
    height: 32px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    border: 0;
    margin-bottom: 1px;
    overflow: hidden;
    &.q-table--col-auto-width {
      padding: 0 0px 2px 8px;
      width: 1px;
      line-height: 1;
    }
  }

  .q-table--dense .q-table thead tr,
  .q-table--dense .q-table tbody tr,
  .q-table--dense .q-table tbody td {
    height: 38px;
    font-size: 14px;
    color: rgba(0, 0, 0, var(--t-color-opacity, /*批量处理90%透明度*/ 0.9));
    cursor: pointer;
  }

  th {
    font-size: 14px !important;
  }

  .q-table--dense .q-table thead tr {
    background-color: #fafafa;
    color: rgba(0, 0, 0, 0.56);
  }

  .q-table--dense .q-table tbody tr:hover,
  .q-table--dense .q-table tbody td:hover {
    background: #f0f2f5;
    // color: var(--t-color);
    td {
      // color: var(--t-color);
    }

    .t-checkbox .q-checkbox__bg {
      border: 1px solid var(--t-color);
    }
  }

  .select_helper_popup_table .q-table__middle {
    overflow-y: auto;
    max-height: 384px;
    min-height: 96px;

    .q-table {
      width: 100%;
      /* adjust as per your requirements */
      border-collapse: collapse;
      // table-layout: fixed;

      tbody {
        // display: block;
        overflow-y: scroll;
        height: calc(100% - 40px);
      }

      thead {
        position: sticky;
        top: 0;
        background-color: #f9f9f9;
        z-index: 1;
        /* make sure it's above other elements */
      }
    }
  }

  // }
  // .q-table--dense .q-table tbody{
  //   height :336px;
  //   display: table;
  //   overflow: auto;
  // }
  .q-table tbody td:before {
    background: rgba(0, 0, 0, 0);
    // color:var(--t-color) ;
  }

  th:hover {
    border-left: 0px rgba(0, 0, 0, 0.1) solid;
    border-right: 0px rgba(0, 0, 0, 0.1) solid;
  }
}

.select_helper_history_content {
  // margin-bottom: 10px;
  // margin-top: 10px;
  // margin-right: 10px;
  .q-chip__content {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: inline-block;
  }
}

.select_helper_popup_single_row_table {
  box-shadow: none;
  tbody {
    display: grid;
    gap: 1px;
  }
  .scroll {
    overflow: inherit;
  }
  .q-table tbody td {
    // width: 100vw;
  }
}

.select_helper_popup_table_tr_checked {
  background-color: rgba(var(--t-color-rgb), 0.1) !important;
  color: var(--t-color) !important;

  td {
    // color: var(--t-color) !important;
    background-color: transparent !important;
  }

  .t-checkbox .q-checkbox__bg {
    border: 1px solid var(--t-color) !important;
  }

  &:hover {
    background-color: #e6f2fb !important;
    color: var(--t-color) !important;

    td {
      color: var(--t-color) !important;
      background-color: #e6f2fb !important;
    }

    .t-checkbox .q-checkbox__bg {
      border: 1px solid var(--t-color) !important;
    }
  }
}

.select_helper_popup_single_row_table {
  &_mainKeyWord {
    display: block;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    padding-left: 4px;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
    margin-top: 1px;
  }

  &_checked_subSidiary {
    display: block;
    width: 100%;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.56);
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
  }
}

.select_helper_input {
  .select_helper_tag {
    font-size: 14px;
    line-height: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    max-width: calc(100% - 46px);
    .select-tag {
      flex: 1 1 auto;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      // max-width: 100% !important;
    }
    button {
      display: none;
      height: 14px !important;
      width: 14px !important;
      min-height: 14px !important;
      min-width: 14px !important;
      transform: scale(1);
    }

    i {
      display: inline-block;
      // height: 12px !important;
      width: 14px !important;
      font-style: normal;
      margin: 0 4px 0 2px;
    }
  }

  .select_helper_tag_readonly {
    button {
      display: none;
    }

    i {
      display: inline-block;
      // height: 12px !important;
      // width: 12px !important;
      font-style: normal;
    }
  }

  .q-field:hover .select_helper_tag {
    button {
      display: inline-flex;
    }

    & > i {
      display: none;
    }
  }

  .q-field:hover .select_helper_tag_readonly {
    button {
      display: none;
    }

    & > i {
      display: inline-block;
    }
  }

  .select_helper_input_inner::-webkit-input-placeholder {
    color: rgba(0, 0, 0, 0.32);
  }
}

.q-table--dense .q-table thead tr,
.q-table--dense .q-table tbody tr,
.q-table--dense .q-table tbody td {
  height: 38px;
}

.select_helper_popup_single_row_table .active {
  background: #f0f2f5 !important;
}

.select_helper_popup_content .active {
  background: #f0f2f5 !important;
}

.select_helper_popup_content .q-table__bottom {
  color: rgba(
    0,
    0,
    0,
    var(--t-color-opacity, /*批量处理90%透明度*/ 0.9)
  ) !important;
}

/***** 移动端样式   *******/
.select_helper_popup_m {
  .tr-input-search .q-field--dense .q-field__inner .q-field__control {
    height: 40px !important;
  }
  .q-field__focusable-action {
    padding: 1px 8px !important;
  }
  .q-table--dense .q-table thead tr,
  .q-table--dense .q-table tbody tr,
  .q-table--dense .q-table tbody td {
    min-height: 44px;
    height: auto;
    border: 0;
    margin-bottom: 1px;
  }
  .isMutile {
    .q-table--dense .q-table thead tr,
    .q-table--dense .q-table tbody tr,
    .q-table--dense .q-table tbody td {
      height: auto;
      padding: 2px;
      margin-bottom: 1px;
      border: 0;
    }
  }
  .q-table--dense .q-table tbody td {
    // border-bottom:1px solid #fff;
  }

  .q-table--dense .q-table tbody tr:hover,
  .q-table--dense .q-table tbody td:hover {
    background: #fff;

    .t-checkbox .q-checkbox__bg {
      border: 1px solid currentColor;
    }
  }
  .select_helper_history {
    margin: 8px 0 0 0;
    padding: 0 16px;
  }
  &.select_helper_popup_search {
    .select_helper_history {
      margin: 12px 0 8px 0;
      padding: 0px;
    }
    .tr-input-search .q-field--dense .q-field__inner .q-field__control {
      height: 40px;
      gap: 8px;
      border-radius: 4px;
    }
    .material-icons {
      margin-left: 8px !important;
    }
  }
  header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    button.q-btn .q-icon {
      font-size: 20px;
    }
    span {
      height: 40px;
      line-height: 40px;
      font-size: 16px;
      font-weight: 600;
    }
    i {
      position: absolute;
      left: 16px;
    }
    .right {
      position: absolute;
      right: 16px;
      display: inline;
    }
  }
  tr {
    padding-left: 8px;
    span {
      display: flex;
      align-items: center;
    }
    img {
      width: 32px;
      height: 32px;
      border-radius: 4px;
      overflow: hidden;
      margin-left: 8px;
    }
  }
  .isMutile {
    tbody {
      // padding: 0 16px;
    }
    .q-table--dense .q-table th,
    .q-table--dense .q-table td {
      padding: 0;
    }
    .q-table--dense .q-table th:first-child,
    .q-table--dense .q-table td:first-child {
      padding-left: 0;
    }
    .q-table--col-auto-width {
      width: 17.5px;
      padding-left: 16px !important;
    }
    .select_helper_popup_single_row_table_mainKeyWord {
      line-height: 1;
      margin-top: 2px;
    }
  }
  .isNotMutile {
    .select_helper_popup_single_row_table_mainKeyWord {
      padding-left: 0px;
      line-height: 1;
    }
    tr {
      padding-left: 0px;
      span {
        display: flex;
        align-items: center;
      }
      img {
        margin-left: 0px;
        margin-right: 8px;
        width: 32px;
        height: 32px;
        border-radius: 4px;
        overflow: hidden;
      }
    }
  }
  .select_helper_popup_footGroup {
    padding: 12px !important;
    display: flex;
    gap: 12px;
    .select_helper_popup_footGroup_checkContent_content{
      button{
          line-height: 44px !important;
      }
    }
    button {
      height: 44px !important;
    
    }
  }
}
// 春辉，我先把那段 js 代码放到 css 中了，发一版看看效果
// .select_helper_input.select_helper_input_extra {
//   .q-field__control-container.col.relative-position.row.no-wrap.q-anchor--skip {
//     display: none;
//   }
//   .q-field__prepend.q-field__marginal.row.no-wrap.items-center {
//     flex: 1;
//   }
//   .tr-input-default .q-field--dense .q-field__control {
//     height: auto;
//     min-height: 32px;
//   }
//   .tr-input-default .q-field--dense .q-field__marginal {
//     height: auto;
//   }
// }

// js 的样式 -> 改为 css 的样式 （js 原文 的 520 - 545 行， 复制如下）
// refField.value.$el.querySelector(
//   '.q-field__control-container.col.relative-position.row.no-wrap.q-anchor--skip',
// ).style.display = 'none';
// refField.value.$el.querySelector(
//   '.q-field__prepend.q-field__marginal.row.no-wrap.items-center',
// ).style.flex = '1';
// if (
//   refField.value.$el.querySelector(
//     '.tr-input-default .q-field--dense .q-field__control',
//   )
// ) {
//   refField.value.$el.querySelector(
//     '.tr-input-default .q-field--dense .q-field__control',
//   ).style.height = 'auto';
//   refField.value.$el.querySelector(
//     '.tr-input-default .q-field--dense .q-field__control',
//   ).style.minHeight = '32px';
// }

// refField.value.$el.querySelector(
//   '.tr-input-default .q-field--dense .q-field__marginal',
// )
//   ? (refField.value.$el.querySelector(
//       '.tr-input-default .q-field--dense .q-field__marginal',
//     ).style.height = 'auto')
//   : '';
/*******

多列模式下的样式
***************/

.select_helper_input_multiseriate {
  .q-field--readonly,
  .tr-input-default .q-field--disabled {
    background-color: transparent !important;
  }
  .q-field--dense .q-field__inner .q-field__control {
    border-color: rgba(0, 0, 0, 0) !important;
    background-color: transparent !important;
    align-items: center;
    padding: 0 !important;
  }
  input {
    display: none !important;
  }
  .q-field__control {
    justify-content: start !important;
  }
  .q-field__prepend {
    flex: none !important;
    max-width: calc(100% - 20px);
  }
  .select_helper_tag .select-tag {
    max-width: none !important;
    flex: none !important;
  }
  // &.select_helper_input_multiseriate_dropPosition_top .q-field:hover .select_helper_tag {
  //   button {
  //     display: none;
  //   }

  //   &>i {
  //     display: inline-block;
  //   }
  // }
}
.isMultiseriate {
  max-width: 1216px;
  tbody {
    display: flex;
    justify-content: start;
    flex-wrap: wrap;
    gap: 4px;
  }
  tr {
    // margin-right: 0.7% !important;
  }
}
.dropPosition_top {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  max-width: 100vw !important;
  .select_helper_popup_content {
    padding: 20px 0px 8px 20px !important;
    .q-infinite-scroll {
      padding-right: 20px;
    }
  }
}
.dropPosition_auto {
  // top: auto;
  // bottom: auto;
  .select_helper_popup_content {
    padding: 20px 0px 8px 20px !important;
    .q-infinite-scroll {
      padding-right: 20px;
    }
  }
}
.searchByMultiseriate {
  .select-tag {
    font-size: 14px;
    color: rgba(
      0,
      0,
      0,
      var(
        --t-color-opacity,
        /*批量处理透明度,将80%替换为--t-color-opacity*/ 0.8
      )
    );
  }
  .q-btn--dense.q-btn--round {
    min-height: 14px !important;
    min-width: 14px !important;
    width: 14px;
    margin-top: -2px;
    font-size: 6px !important;
  }
  .select_helper_tag i {
    display: inline-block;
    width: 14px !important;
    font-style: normal;
    height: 14px !important;
    text-align: center;
    padding: 0 2px 0 4px;
  }
  .q-field__prepend {
    width: 100%;
    height: auto;
    min-height: 30px;
    padding: 2px 0;
  }
  .q-field__control-container {
    display: none;
  }
  .q-field__control {
    height: auto !important;
  }
  .select_helper_tag {
    button {
      display: none;
    }

    & > i {
      display: inline-block;
    }
  }
  .q-field:hover .select_helper_tag {
    button {
      display: inline-flex;
    }

    & > i {
      display: none;
    }
  }
}
.select_helper_input_multiseriate {
  .q-field--dense
    .q-field__inner
    .q-field__control
    .q-field__control-container {
    display: none;
  }
}
.select_helper_columnarPattern_pagination {
  .t-prefab-pagination__perfective-total {
    display: none;
  }
  .q-field__append.q-field__marginal.row.no-wrap.items-center.q-anchor--skip {
    display: none;
  }
  .page-size-val-suffix {
    display: none;
  }
  .t-prefab-pagination__perfective-jump {
    display: none;
  }
}
.tr-input-noborder {
  .select_helper_tag.select_helper_tag_readonly.default {
    margin-right: 8px;
  }
  .select_helper_tag {
    max-width: 100% !important;
  }
  .q-field--dense .q-field__inner .q-field__control {
    gap: 0 !important;
  }
}
/***** 选中状态的样式  *******/
.tr-input-noborder .q-field--dense .q-field__inner .q-field__control {
  border: 1px solid rgb(255, 255, 255, 0);
}
.tr-input-noborder .q-field--dense .q-field__inner .q-field__control:hover {
  border: 1px solid rgb(255, 255, 255, 0);
}
.tr-input-noborder .q-field--focused .q-field__inner .q-field__control {
  // box-shodow:0 0 3px rgb(255, 255, 255, 0)
}
.tr-input-noborder .t-input {
  border: 1px solid rgb(255, 255, 255, 0);
}
@media screen and (min-width: 767px) {
  .tr-input-noborder.select_helper_isOpening
    .q-field--dense
    .q-field__inner
    .q-field__control,
  .tr-input-noborder.select_helper_isOpening
    .q-field--dense
    .q-field__inner
    .q-field__control:hover {
    border: 1px solid var(--t-color) !important;
  }
}

@media screen and (max-width: 766px) {
  :not(.t-form) {
    .tr-select-triangleicon{
      width:100% ;
      max-width: 100% ;
    }
    .tr-select-triangleicon>label {
      width: 100% !important;
      max-width: 100% !important;
    }
    .tr-input-default.tr-select-triangleicon .q-field--dense .q-field__inner .q-field__control{
      gap:4px
    }
   .tr-select-triangleicon .icon-t-arrow-down:before {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 4px solid rgba(150, 154, 160, 1);
      top: -2px;
      left: 0px;
    }
    .tr-select-triangleicon button {
      .icon-t-arrow-down:before {
        content: '' !important;
        position: absolute;
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 4px solid rgba(150, 154, 160, 1);
        top: 2px;
        left: 0px;
      }
    }
    .tr-select-triangleicon.select_helper_input .icon-t-arrow-down {
      width: 8px;
      transform: rotate(0deg) !important;
      top: -4px;
    }
   
    .tr-select-triangleicon.select_helper_input .select_helper_tag {
      margin-right: 4px;
      font-size: 12px;
    }
    .tr-select-triangleicon *{
      width: fit-content ;
    }
    .icon-t-arrow-down{
      width: 10px;
    }
    .tr-select-triangleicon .icon-t-arrow-down.rotate-180 {
      top: -2px;
    }
    .tr-select-triangleicon.tr-input-noborder .q-field--dense .q-field__inner .q-field__control {
      gap: 4px !important;
    }
  }
  
}

     .tr-select-triangleicon.select_helper_input:not(.select_helper_input_multiseriate) .select_helper_tag button,.tr-select-triangleicon.select_helper_input:not(.select_helper_input_multiseriate)  .select_helper_tag i{
      display: none !important;
    }
     .tr-input-noborder.select_helper_input:not(.select_helper_input_multiseriate) .select_helper_tag button,.tr-input-noborder.select_helper_input:not(.select_helper_input_multiseriate)  .select_helper_tag i {
      display: none !important;
    }
    
   
    @media screen and (min-width: 766px) {
     .tr-input-noborder.select_helper_input:not(.select_helper_input_multiseriate) .q-field--dense .q-field__append{
        padding-left: 8px !important;
      }
       .select_helper_isOpening .select_helper_tag.select_helper_tag_readonly.default{
      display: none !important
    }
    }
.select_helper_popup .q-table--dense .q-table th:first-child,
.select_helper_popup .q-table--dense .q-table td:first-child {
  text-align: left !important;
}
